<script setup>
import { onMounted } from 'vue';
import HomeCategory from './components/HomeCategory.vue'
import HomeBanner from './components/HomeBanner.vue'
import HomeNew from './components/HomeNew.vue'
import HomeHot from './components/HomeHot.vue'
import HomeProduct from './components/HomeProduct.vue'

//给父组件，子组件需要重复请求的数据
    //触发获取导航列表的action
    import { useNewAndHotStore } from '@/stores/goodsStore'
    
    //创建实例
    const NewAndHotStore = useNewAndHotStore();
    //用狗子函数调用实例中的方法（上边要导入相应的包）
    onMounted(
        () => NewAndHotStore.getNewAndHot()
    )


</script>

<template>
  <div class="container">
    <HomeCategory />
    <HomeBanner />
  </div>
  <HomeNew />
  <HomeHot />
  <HomeProduct />

  <!-- 测试新鲜好物和人气推荐 -->
  



</template>